//
//  Clock.m
//  MultiTimer
//
//  Created by Jeffrey Palm on 6/3/09.
//  Copyright 2009 Navtones. All rights reserved.
//

#import "Clock.h"


@implementation Clock

@synthesize time;

-(id)init {
	if ([super init]) {
		time = 0;
	}
	return self;
}

-(BOOL)tick {
	NSLog(@"clock.tick");
	if (time>0) time--;
	return time == 0;
}

-(void)resetTime:(int)hours andMinutes:(int)minutes {
	NSLog(@"resetTime time=%i",time);
	time = 3600*hours + 60*minutes;
}

@end
